//思路二
var obj = new URLSearchParams(location.search);
var categoryId = obj.get('categoryId')
// console.log(categoryId);
$.ajax({
	type:'get',
	url:`/posts/category/${categoryId}`,
	success:function(res){
		console.log(res);
		var html = template('listTpl',{data:res})
		$('#listBox').html(html)
	}
})